home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d1 / check.arc / CHECK.DOC < prev    next >
Encoding:
Text File  |  1987-01-25  |  3.1 KB  |  97 lines

  1.  
  2.    CHECK
  3.    -----
  4.  
  5.    Purpose:  For use with batch files, CHECK tests for various conditions and
  6.              reports by setting DOS ErrorLevel.
  7.  
  8.    Format:      CHECK parameter [parameter...]
  9.  
  10.              Parameters must be separated with spaces.  Some of them require
  11.              parameters of their own.  Here is the list:
  12.  
  13.              DAY
  14.  
  15.                  Returns day of the month (1-31)
  16.  
  17.              DISKSPACE [d:]
  18.  
  19.                  returns the number of whole 16K blocks of free disk space
  20.                  from the indicated or default drive.  It returns 0 if an
  21.                  error is encountered.  A return of 255 means that there are
  22.                  at least that many blocks free.
  23.  
  24.              FILEFOUND filename
  25.  
  26.                  returns 0 if the indicated file is found, 1 if it's not.
  27.  
  28.              FILESIZE filename
  29.  
  30.                  returns the length in kilobytes of the specified file.  255
  31.                  means the file is 255K or larger.  0 means the file can't be
  32.                  found.
  33.  
  34.              FILETEXT filename 'text'
  35.  
  36.                  returns 0 if the specified text is found within the indicated
  37.                  file.  1 is returned if the file doesn't contain the text, if
  38.                  the file can't be found or if there's syntax error.
  39.  
  40.              KEYBOARD
  41.  
  42.                  returns 1 if a key has been pressed, 0 if one has not.
  43.  
  44.              KEYPRESS
  45.  
  46.                  waits for a keypress (if one hasn't already been pressed) and
  47.                  returns its ASCII code.
  48.  
  49.              MEMORY
  50.  
  51.                  returns the number of 16K RAM modules present in the system.
  52.  
  53.              MODEL
  54.  
  55.                  returns the machine ID byte of the computer being used.  For
  56.                  IBM machines, 255 means a plain PC, 254 a PC/XT or a port-
  57.                  able, 253 a PCjr, 252 a PC/AT, and 249 a PC Convertible.
  58.  
  59.    CHECK                                                                Page 2
  60.  
  61.  
  62.              MONTH
  63.  
  64.                  returns the current month (1-12)
  65.  
  66.              TIME
  67.  
  68.                  returns the current hour of the day (0-23)
  69.  
  70.              VIDEOCARD
  71.  
  72.                  returns the current video mode (0-16).
  73.  
  74.              VIDEOMODE
  75.  
  76.                  returns a value indicating what kind of video adapter is
  77.                  being used.  (0=MDA, 1=CGA, 2=EGA)
  78.  
  79.              VERSION
  80.  
  81.                  returns the major number of the version of DOS in use.
  82.  
  83.              8087 or 80287
  84.  
  85.                  return 0 if either an 8087 nor an 80287 is present, 1 if not.
  86.  
  87.  
  88.    Remarks:  To use CHECK, you run it from a batch file and sort out the re-
  89.              turned value with IF ERRORLEVEL statements.  Remember that IF
  90.              ERRORLEVEL n is true if the error level is n or higher.
  91.  
  92.              This program is copyright 1986 by Ziff-Davis Publishing Co.  It
  93.              was written by Jeff Prosise and published in "PC Lab Notes," PC
  94.              Magazine, 6/3, Feb. 10, 1987, pp. 299-321.
  95.  
  96.              See that article for detailed discussion of how CHECK works, how
  97.              to use it and how it might be modified.